#include <stdio.h>

int main() {
  int num;
  char errbuf[0x100];
  if (scanf("%i", &num) != 1) {
    fgets(errbuf, sizeof(errbuf), stdin);
    fprintf(stderr, "%s: invalid input\n", errbuf);
    return 1;
  }
  printf("oct: 0%o\n", num);
  printf("dec: %d\n", num);
  printf("hex: 0x%x\n", num);
  return 0;
}
